package com.xbongbong.pro.enums.teammembers.enums;

import com.xbongbong.saas.enums.XbbRefTypeEnum;
import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

/**
 * @author: 汪腾伟
 * @date: Created in 2022/6/1 14:58
 * @description： 详情页需要对编辑按钮进行控制的业务
 */
@Getter
public enum TeamEditBusinessEnum {

    /**
     * 客户管理
     */
    CUSTOMER_MANAGEMENT(XbbRefTypeEnum.CUSTOMER_MANAGEMENT.getCode()),

    /**
     * 联系人
     */
    CONTACT(XbbRefTypeEnum.CONTACT.getCode()),

    /**
     * 销售机会
     */
    SALES_OPPORTUNITY(XbbRefTypeEnum.SALES_OPPORTUNITY.getCode()),

    /**
     * 报价单
     */
    QUOTATION(XbbRefTypeEnum.QUOTATION.getCode()),

    /**
     * 合同订单
     */
    CONTRACT(XbbRefTypeEnum.CONTRACT.getCode()),

    /**
     * 退货退款
     */
    REFUND(XbbRefTypeEnum.REFUND.getCode()),

    /**
     * 应收款
     */
    PAYMENT(XbbRefTypeEnum.PAYMENT.getCode()),

    /**
     * 回款单
     */
    PAYMENT_SHEET(XbbRefTypeEnum.PAYMENT_SHEET.getCode()),

    /**
     * 付款计划
     */
    PAY_PLAN(XbbRefTypeEnum.PAY_PLAN.getCode()),

    /**
     * 付款单
     */
    PAY_SHEET(XbbRefTypeEnum.PAY_SHEET.getCode()),

    /**
     * 供应商
     */
    SUPPLIER(XbbRefTypeEnum.SUPPLIER.getCode()),

    /**
     * 供应商联系人
     */
    SUPPLIER_CONTACT(XbbRefTypeEnum.SUPPLIER_CONTACT.getCode()),

    /**
     * 采购合同
     */
    PURCHASE(XbbRefTypeEnum.PURCHASE.getCode()),

    /**
     * 采购退货单
     */
    RETURNED_PURCHASE(XbbRefTypeEnum.RETURNED_PURCHASE.getCode()),

    /**
     * BOM清单
     */
    BOM_BILL(XbbRefTypeEnum.BOM_BILL.getCode()),

    /**
     * 生产单
     */
    PRODUCTION_ORDER(XbbRefTypeEnum.PRODUCTION_ORDER.getCode()),

    /**
     * 市场活动
     */
    MARKET_ACTIVITY(XbbRefTypeEnum.MARKET_ACTIVITY.getCode()),

    /**
     * 线索
     */
    CLUE(XbbRefTypeEnum.CLUE.getCode()),

    /**
     * 工单
     */
    WORK_ORDER(XbbRefTypeEnum.WORK_ORDER.getCode()),

    /**
     * PAAS表单
     */
    PAAS_TEAM(XbbRefTypeEnum.SYSTEM.getCode()),
    /**
     * 工单v2
     */
    WORK_ORDER_V2(XbbRefTypeEnum.WORK_ORDER_V2.getCode()),
    /**
     * 回执单
     */
    RECEIPT_ORDER(XbbRefTypeEnum.RECEIPT_ORDER.getCode()),
    ;

    private Integer businessType;

    TeamEditBusinessEnum(Integer businessType) {
        this.businessType = businessType;
    }

    public static List<Integer> getAllBusinessType () {
        List<Integer> allBusinessTypeList = new ArrayList<>();
        for (TeamEditBusinessEnum teamEditBusinessEnum : TeamEditBusinessEnum.values()) {
            allBusinessTypeList.add(teamEditBusinessEnum.getBusinessType());
        }
        return allBusinessTypeList;
    }
}
